<template>
  <el-table :data="tableData" style="width: 100%;height: 350px;overflow-y: auto;" >
    <el-table-column prop="type" label="科目类型" width="250" />
    <el-table-column prop="subject" label="考试科目" width="250" />
    <el-table-column prop="score" label="分数" width="250"/>
    <el-table-column prop="testDate" label="考试时间"  /> 
  </el-table>
</template>

<script setup>
import {onMounted,ref} from 'vue'
import {getStudy} from "../api/function"
import {useStore} from 'vuex'
const store = useStore();

var tableData = ref([]);
onMounted(() => {
  getStudy(store.state.user.id).then((res) => {
    tableData.value = res.data;
  })
});

</script>
